package top.continew.admin.generator.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.continew.admin.generator.model.entity.TaskTransferDO;
import top.continew.admin.generator.model.resp.TransferChainResp;

import java.util.List;

/**
 * 任务转派记录 Mapper
 */
@Mapper
public interface TaskTransferMapper extends BaseMapper<TaskTransferDO> {

    /**
     * 查询转派链条
     *
     * @param taskId 任务ID
     * @return 转派链条列表
     */
    List<TransferChainResp> selectTransferChain(@Param("taskId") Long taskId);

    /**
     * 查询用户可查看的任务ID列表
     *
     * @param userId 用户ID
     * @return 任务ID列表
     */
    List<Long> selectViewableTaskIds(@Param("userId") Long userId);
}